import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  searchShow: false,
  labelWidth: 110,
  viewBtn: true,
  column: [
    {
      type: 'input',
      label: '党组织名称',
      prop: 'organizationPart',
      span: 12,
      formslot: true,
      search: true,
      required: true,
      rules: [{ required: true, message: '请选择党组织名称' }]
    },
    {
      type: 'input',
      label: '表彰单位',
      prop: 'recognitionUnit',
      span: 12,
      formslot: true,
      search: true,
      required: true,
      rules: [{ required: true, message: '请选择表彰单位' }]
    },
    {
      type: 'select',
      label: '表彰类型',
      prop: 'recognitionType',
      span: 12,
      search: true,
      props: { label: 'label', value: 'value' },
      dicUrl: `${services.adminService}dict/type/RECOGNITION_TYPE`,
      dicMethod: 'get',
      width: 120,
      required: true,
      rules: [{ required: true, message: '请选择表彰类型' }]
    },
    {
      type: 'input',
      label: '发文名称',
      prop: 'postName',
      span: 12,
      required: true,
      rules: [{ required: true, message: '请填写发文名称' }]
    },
    {
      type: 'select',
      label: '荣耀级别',
      prop: 'honorLevel',
      span: 12,
      search: true,
      props: { label: 'label', value: 'value' },
      dicUrl: `${services.adminService}dict/type/honor_Level`,
      dicMethod: 'get',
      width: 120,
      required: true,
      rules: [{ required: true, message: '请选择荣耀级别' }]
    },
    {
      type: 'date',
      label: '发文时间',
      prop: 'dispatchDate',
      span: 12,
      search: true,
      width: 150,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      required: true,
      rules: [{ required: true, message: '请选择发文时间' }]
    },
    {
      type: 'textarea',
      label: '备注',
      prop: 'remarks',
      span: 24
    },
    {
      label: '附件信息',
      prop: 'uploadPage',
      type: 'input',
      formslot: true,
      slot: true,
      span: 24,
      hide: true
    }
  ]
}
